{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 09 运算符"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1.【选择题】以下表达式中，哪一个选项的运算结果是False？（ ）\n",
    "\n",
    "A.'abc' < 'ABC'  \n",
    "B.5 > 3 > 1  \n",
    "C.2 < 1 and 12 < 3 or 2 > 1  \n",
    "D.(1 is 3) == 0"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：A"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2.【填空】写出下列代码的运行结果：（ ）  \n",
    "`\n",
    "x = 3\n",
    "y = 6\n",
    "print(x&y)\n",
    "`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "3.【选择】下列代码的运行结果是：（ ）  \n",
    "`\n",
    "x = 2\n",
    "x *= 2**2**3//100\n",
    "print(x)`\n",
    "\n",
    "A.0  \n",
    "B.4  \n",
    "C.5  \n",
    "D.5.12"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：B"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.【填空】写出下列代码的运行结果：（ ）   \n",
    "`\n",
    "import math\n",
    "print(math.sqrt(3)*math.sqrt(3) == 3)`\n",
    "\n",
    "A.3  \n",
    "B.True  \n",
    "C.False  \n",
    "D.math.sqrt(3)*math.sqrt(3) == 3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：C"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "5.【判断】以下代码的运行结果是True。（ ）  \n",
    "`\n",
    "x = 5\n",
    "y = 3\n",
    "print(x is y or x >= y)`\n",
    "\n",
    "A.√  \n",
    "B.×"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：A"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "6.【判断】x&y 和 x and y 的结果相同。（ ）\n",
    "\n",
    "A.√  \n",
    "B.×"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：×"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "7.【填空】使用内置函数round()将3.1415926保留4位有效数字：（ ）"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：round(3.1415926,4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "8.【填空】语句x = 3==3, 5执行结束后，变量x的值为：（ ）"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：(True,5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "9.【判断】表达式表达式“[3] in [1, 2, 3, 4]”的值为True。（ ）\n",
    "\n",
    "A.√  \n",
    "B.×"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：B"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
